package com.ruoyi.sjfx.rjzzqfx.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.sjfx.rjzzqfx.service.lRjzzqfxService;
import com.ruoyi.sjfx.rjzzqfx.vo.RjzzqfxVo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.*;
import java.util.stream.Collectors;

@RestController
@RequestMapping("/sjfx/rjzzqfx")
public class RjzzqfxController extends BaseController {

    /**
     * 软件著作权分析
     */
    @Resource
    private lRjzzqfxService rjzzqfxService;

    @GetMapping(value = "/selectRjzzqfxList")
    public AjaxResult selectRjzzqfxList(RjzzqfxVo rjzzqfxVo) {

        List<RjzzqfxVo> rjzzqfxVos = rjzzqfxService.selectRjzzqfxList();

        List<String> ndArray = new ArrayList<>();
        List<Integer> slArray = new ArrayList<>();
        for (RjzzqfxVo vo : rjzzqfxVos) {
            ndArray.add(vo.getNd());
            slArray.add(vo.getSl());
        }

        Map<String,Object> rzMap = new HashMap<>();
        rzMap.put("nd",ndArray);
        rzMap.put("sl",slArray);
        return AjaxResult.success(rzMap);
    }
}
